package com.tbit.uqbike.client.controller;

import com.tbit.uqbike.client.pojo.AccountConfig;
import com.tbit.uqbike.client.service.CacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统配置
 */
@RestController
@RequestMapping("/accountConfig")
public class AccountConfigController {
    @Autowired
    private CacheService cacheService;

    /**
     * 获取系统配置
     *
     * @param accountId 区域id
     */
    @GetMapping("/getByAccountId")
    public AccountConfig getByAccountId(Integer accountId) {
        return cacheService.getConfig(accountId);
    }
}
